﻿ 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SysCommon.Log
{

    /// <summary>
	/// 数据库字段持性
	/// </summary>
   [AttributeUsage(AttributeTargets.All)]
    public sealed class FieldAttribute : System.Attribute
    {
        /// <summary>
        /// Deprecated. Do not use.
        /// </summary>
        public FieldAttribute() { }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sdbName">数据库的字段名称</param>
        public FieldAttribute(string sdbName)
        {
            _DBName = sdbName;
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sdbName">数据库的字段名称</param>
        /// <param name="description">字段注释</param>
        public FieldAttribute(string sdbName, string description)
        {
            _DBName = sdbName;
            _Description = description;
        }

        string _Description = String.Empty;
        /// <summary>
        /// 字段注释
        /// </summary>
        public string Description
        {
            get { return _Description; }
        }
        string _DBName = String.Empty;
        /// <summary>
        /// 数据库的字段名称
        /// </summary>
        public string DBName
        {
            get { return _DBName; }
        }
    }
}
